package com.che.libcommon.api;

/**
 * Created by zl on 2017/11/28.
 */

public class ApiException extends Exception {
  public int code;

  public ApiException(String message, int code) {
    super(message);
    this.code = code;
  }

  public ApiException(String message,BaseResult result) {
    super(message);
    this.baseResult = result;
    code = result.statusCode;
  }

  private BaseResult baseResult;

  public BaseResult getBaseResult() {
    return baseResult;
  }

  public ApiException(String message, Throwable cause) {
    super(message, cause);
  }
}
